package com.mervin.patterns.builder;

/***************************************
 * @Auther: mervin
 * @Date: 2020-04-18 00:58
 * @Description: 抽象建造者
 ***************************************/
public abstract class FruitBuilder {
    protected Fruit fruit;

    //构造函数赋值
    public FruitBuilder(){
        this.fruit = new Fruit();
    }
    //set 方法赋值
    public void setFruit(Fruit fruit) {
        this.fruit = fruit;
    }
    //清洗工艺
    public abstract void washFruit();
    //挑选规则
    public abstract void selectionFruit();
    //包装工艺
    public abstract void packagedFruit();

    //得到处理的产品
    public Fruit buildFruit(){
        return fruit;
    }

}
